package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="CCP_DICMNG_DICTAB"
 *     
*/
public class CcpDicmngDictab implements Serializable {

    /** identifier field */
    private String dicCode;

    /** nullable persistent field */
    private String dicName;

    /** nullable persistent field */
    private String dicType;

    /** full constructor */
    public CcpDicmngDictab(String dicCode, String dicName, String dicType) {
        this.dicCode = dicCode;
        this.dicName = dicName;
        this.dicType = dicType;
    }

    /** default constructor */
    public CcpDicmngDictab() {
    }

    /** minimal constructor */
    public CcpDicmngDictab(String dicCode) {
        this.dicCode = dicCode;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="DIC_CODE"
     *         
     */
    public String getDicCode() {
        return this.dicCode;
    }

    public void setDicCode(String dicCode) {
        this.dicCode = dicCode;
    }

    /** 
     *            @hibernate.property
     *             column="DIC_NAME"
     *             length="50"
     *         
     */
    public String getDicName() {
        return this.dicName;
    }

    public void setDicName(String dicName) {
        this.dicName = dicName;
    }

    /** 
     *            @hibernate.property
     *             column="DIC_TYPE"
     *             length="32"
     *         
     */
    public String getDicType() {
        return this.dicType;
    }

    public void setDicType(String dicType) {
        this.dicType = dicType;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("dicCode", getDicCode())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof CcpDicmngDictab) ) return false;
        CcpDicmngDictab castOther = (CcpDicmngDictab) other;
        return new EqualsBuilder()
            .append(this.getDicCode(), castOther.getDicCode())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getDicCode())
            .toHashCode();
    }

}
